package com.hjm.project.gearsRecord.gearsRecord.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hjm.project.gearsRecord.gearsRecord.mapper.GearsRecordMapper;
import com.hjm.project.gearsRecord.gearsRecord.domain.GearsRecord;
import com.hjm.project.gearsRecord.gearsRecord.service.IGearsRecordService;
import com.hjm.common.utils.text.Convert;

/**
 * 档位变更记录Service业务层处理
 * 
 * @author admin
 * @date 2020-11-23
 */
@Service
public class GearsRecordServiceImpl implements IGearsRecordService 
{
    @Autowired
    private GearsRecordMapper gearsRecordMapper;

    /**
     * 查询档位变更记录
     * 
     * @param id 档位变更记录ID
     * @return 档位变更记录
     */
    @Override
    public GearsRecord selectGearsRecordById(Long id)
    {
        return gearsRecordMapper.selectGearsRecordById(id);
    }

    /**
     * 查询档位变更记录列表
     * 
     * @param gearsRecord 档位变更记录
     * @return 档位变更记录
     */
    @Override
    public List<GearsRecord> selectGearsRecordList(GearsRecord gearsRecord)
    {
        return gearsRecordMapper.selectGearsRecordList(gearsRecord);
    }

    /**
     * 新增档位变更记录
     * 
     * @param gearsRecord 档位变更记录
     * @return 结果
     */
    @Override
    public int insertGearsRecord(GearsRecord gearsRecord)
    {
        return gearsRecordMapper.insertGearsRecord(gearsRecord);
    }

    /**
     * 修改档位变更记录
     * 
     * @param gearsRecord 档位变更记录
     * @return 结果
     */
    @Override
    public int updateGearsRecord(GearsRecord gearsRecord)
    {
        return gearsRecordMapper.updateGearsRecord(gearsRecord);
    }

    /**
     * 删除档位变更记录对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteGearsRecordByIds(String ids)
    {
        return gearsRecordMapper.deleteGearsRecordByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除档位变更记录信息
     * 
     * @param id 档位变更记录ID
     * @return 结果
     */
    @Override
    public int deleteGearsRecordById(Long id)
    {
        return gearsRecordMapper.deleteGearsRecordById(id);
    }
}
